﻿using FluentNHibernate.Mapping;
using Salary.Domain;

namespace Salary.NHibernate.Mappings
{
    public class EmployeeMap : ClassMap<Employee>
    {
        public EmployeeMap()
        {
            Table("Employees");
            Id(x => x.Id);
            Map(x => x.Name);
            Map(x => x.Contacts);
            Map(x => x.Rate).CustomType<int>();
            References(x => x.Position);
        }
    }
}
